package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.UserDao;
import entity.UserInfo;

public class SearchUserServlet extends HttpServlet {
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws IOException, ServletException {
		String searchValue = request.getParameter("searchValue");
		UserInfo user = new UserDao().query(searchValue);
		request.setAttribute("user", user);
		request.getRequestDispatcher("searchUser.jsp").forward(request, response);
	}
}
